import React from 'react';
import { connect } from 'react-redux'
import { Input, Button } from "antd";
import { changeInputValue, changeList, deleteItem } from "./store/action";

class App extends React.Component {

  render() {
    const { inputValue, changeInputValue } = this.props
    return (
      <div>
        <Input 
          value={inputValue} 
          onChange={(e) => {changeInputValue(e.target.value)}}
        />
        <Button type="primary">提交</Button>
      </div>
    );
  }

}
const mapStateToProps = (state, ownProps) => ({
  inputValue: state.inputValue
})

const mapDispatchToProps = { 
  changeInputValue, 
  changeList, 
  deleteItem }

export default connect(mapStateToProps, mapDispatchToProps)(App)
